Existing display systems are capable of making a composite of two or more display elements to generate a final image. In such systems, display elements often include overlapping layers, for example in a windowing system for a graphical user interface where on-screen elements, such as windows, may be moved around and placed on top of one another.
Rendering and displaying an image having two or more overlapping layers presents certain problems, particularly in determining how to render that portion of the image where the layers overlap. When the overlapping layers are opaque, the graphics system need only determine which layer is on top, and display the relevant portion of that layer in the final image, and portions of underlying layers that are obscured may be ignored. However, when overlapping layers are translucent, more complex processing may be called for, as some interaction among picture elements (pixels) in each overlapping layer may take place. Accordingly, some calculation may be required to overlay the image elements in order to derive a final image.
Step-by-step compositing techniques for performing these calculations require a number of separate operations in order to generate the final image. This is generally accomplished by forming the composite of image elements in a bottom-up approach, successively combining each new layer with the results of the compositing operations performed for the layers below.
This step-by-step compositing approach has several disadvantages. If the image is constructed in the frame buffer, on-screen flicker may result as the system writes to the frame buffer several times in succession. Alternatively, the image may be constructed in an off-screen buffer, thus avoiding on-screen flicker; however, such a technique requires additional memory to be allocated for the buffer, and also requires additional memory reads and writes as the final image is transferred to the frame buffer.
In addition, step-by-step generation of the final image may result in poor performance due to the large number of arithmetic operations that must be performed. Writing data to a frame buffer is particularly slow on many computers; therefore, conventional systems which write several layers to the frame buffer in succession face a particularly severe performance penalty.
Finally, such a technique often results in unnecessary generation of some portions of image elements that may later be obscured by other image elements, which results in poor performance.